package JJX;

import java.util.Arrays;
import java.util.Scanner;

public class NumMax {
    public static void main(String[] args) {
        System.out.println("请输入三个整数");
        Scanner input = new Scanner(System.in);
        int num1 = input.nextInt();
        int num2 = input.nextInt();
        int num3 = input.nextInt();
        int num[] = {num1, num2, num3};
        /*int max = 0;
        int min = 0;
        if (num.length>0){
            max=num[0];
            min = num[0];
        }
        for (int i = 0; i <num.length ; i++) {
            if (max<num[i]){
                max=num[i];
            }
            if (min>num[i]){
                min = num[i];
            }
        }
        System.out.println("最大值为："+max);
        System.out.println("最小值为："+min);
    }*/
        Arrays.sort(num);
        System.out.println("最大值为：" + num[num.length-1]);
        System.out.println("最小值为：" + num[0]);

    }
}